<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <title> 小程序管理系统</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="format-detection" content="telephone=no">
  <link rel="stylesheet" href="__PUBLIC__/layui/css/layui.css"  media="all">
  <script src="__PUBLIC__/js/echarts.min.js" charset="utf-8"></script>
  <script src="__PUBLIC__/layui/layui.js" charset="utf-8"></script>
  <style type="text/css">
    .tongji-box{
      text-align: center;
      background: #63BA79;
      padding:20px;
      color: #fff;
    }
    .tongji-title{
      font-size: 26px;
    }
    .tongji-num{
      font-size: 24px;
    }
    #chart-box{
      margin-top: 30px;
      height: 500px;
    }
    #page-box{
      font-size: 20px;
      text-align: center;
    }
    #page-box *{
      margin-left: 8px;
    }
    #page-box span{

    }
    #page-box a{
      color: lightskyblue;
    }
    .search-form{
      text-align: center;
    }
    .search-form input{
      width: 600px;
      height: 31px;
    }
    .search-form button{
      width: 60px;
      height: 35px;
      position: relative;
      left: -4px;
      background-color: cadetblue;
      border: 0;
      color: white;
    }
    .search-data{
      float: right;
      position: relative;
      top: 17px;
      font-size: 16px;
      font-weight: 700;
    }
  </style>
</head>
<body>
<div class="layui-layout layui-layout-admin">
  <div class="layui-header">
    <div class="layui-logo">  </div>
    <!-- 头部区域（可配合layui已有的水平导航） -->
    <ul class="layui-nav layui-layout-left">
      <li class="layui-nav-item layui-this"><a href="{:U('Index/index')}">首页</a></li>
      <li class="layui-nav-item"><a href="{:U('InfoCate/index')}">分类信息管理</a></li>
      <li class="layui-nav-item"><a href="{:U('ShopCate/index')}">好店管理</a></li>
      <li class="layui-nav-item"><a href="{:U('Quan/index')}">同城圈管理</a></li>
      <li class="layui-nav-item"><a href="{:U('Member/index')}">用户管理</a></li>
      <li class="layui-nav-item"><a href="{:U('Home/Index/index')}">切换小程序</a></li>
    </ul>
    <ul class="layui-nav layui-layout-right">
      <li class="layui-nav-item">
        <a href="javascript:;">
          <img src="{$Think.session.wechat.headimg}" class="layui-nav-img">
          {$Think.session.wechat.nickname}
        </a>
        <dl class="layui-nav-child">
          <dd><a href="{:U('Home/Index/index')}">切换小程序</a></dd>
          <!-- <dd><a href="">安全设置</a></dd> -->
        </dl>
      </li>
      <li class="layui-nav-item">
        <a href="javascript:;">
          <img src="{$Think.session.headimgurl}" class="layui-nav-img">
          {$Think.session.nickname}
        </a>
        <dl class="layui-nav-child">
          <dd><a href="{:U('Home/Public/logout')}">退出登录</a></dd>
          <!-- <dd><a href="">安全设置</a></dd> -->
        </dl>
      </li>
    </ul>
  </div>

  <div class="layui-side layui-bg-black">
    <div class="layui-side-scroll">
      <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
      <ul class="layui-nav layui-nav-tree"  lay-filter="test">
        <li class="layui-nav-item "><a href="{:U('Index/index')}">数据统计</a></li>
        <li class="layui-nav-item layui-nav-itemed">
          <a class="" href="javascript:;">店铺装修</a>
          <dl class="layui-nav-child">
            <dd class=""><a href="{:U('Adv/homeFlash',array('status'=>0))}">&nbsp;&nbsp;&nbsp;&nbsp;首页轮播展示</a></dd>
          </dl>
        </li>
        <li class="layui-nav-item layui-nav-itemed">
          <a class="" href="javascript:;">商家提现审核</a>
          <dl class="layui-nav-child">
            <dd ><a href="{:U('Withdraw/index',array('status'=>0))}">待审核</a></dd>
            <dd ><a href="{:U('Withdraw/index',array('status'=>1))}">待打款</a></dd>
            <dd ><a href="{:U('Withdraw/index',array('status'=>2))}">已打款</a></dd>
            <dd ><a href="{:U('Withdraw/index',array('status'=>3))}">失效</a></dd>
          </dl>
        </li>

        <li class="layui-nav-item "><a href="{:U('Index/refundlist')}">拼团退款记录</a></li>
        <li class="layui-nav-item"><a href="{:U('Index/gobal')}">全局配置</a></li>
        <li class="layui-nav-item"><a href="{:U('Join/index')}">商家入驻费</a></li>
        <li class="layui-nav-item"><a href="{:U('Top/index')}">置顶收费</a></li>
        <li class="layui-nav-item"><a href="{:U('Adv/index')}">广告管理</a></li>
        <li class="layui-nav-item"><a href="{:U('Index/pay')}">支付配置</a></li>
        <li class="layui-nav-item layui-this"><a href="{:U('Index/getTemplateList')}">模板消息设置</a></li>
        <li class="layui-nav-item"><a href="{:U('Index/fabu')}">小程序发布</a></li>
      </ul>
    </div>
  </div>

  <div class="layui-body">
    <!-- 内容主体区域 -->
    <div style="padding:0 15px;">
      <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
        <legend>模板消息设置</legend>
      </fieldset>

      <button class="layui-btn layui-btn-normal layui-btn-radius updateinfo" >一键更新模板消息</button>
      &nbsp;&nbsp;&nbsp;<span style="color: #9d9d9d;font-size: 14px;">提示：请不要频繁更新模板消息，可能会导致小程序关闭</span>
      <table class="layui-table">
        <colgroup>
          <col width="100">
        </colgroup>
        <thead>
        <tr>
          <th>标题</th>
          <th>模板ID</th>
          <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <foreach name="list" item="vo">
          <tr>
            <td>{$vo['title']}</td>
            <td>{$vo['template_id']}</td>
            <td>详情</td>
          </tr>
        </foreach>
        </tbody>
      </table>
      <div id="page-box">{$show}</div>
    </div>
  </div>

  <div class="layui-footer">
    <!-- 底部固定区域 -->
    © 2017-2018 <a href="https://www.58zltc.com" target="_blank">  </a> All Rights Reserved.
  </div>

</div>
<script>
  layui.use(['element','laypage','layer'], function(){
    var element = layui.element
            ,$ = layui.jquery
            ,layer = layui.layer
            ,laypage = layui.laypage;
    $(".updateinfo").click(function(){
      $.get("/index.php/Tongcheng/Index/getTemplateList", function (res) {
        layer.alert("更新成功!")
        setTimeout(function(){
          location.reload();
        },1000)
      })
    })
  });
</script>

</body>
</html>
